home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
COMMADIO
/
RBBS1.LZH
/
DTRPATCH.DOC
< prev
next >
Wrap
Text File
|
1986-09-22
|
3KB
|
116 lines
DTR (Data Terminal Ready) Fix for QuickBasic
Jeff Porter
1-5-86
As anyone who has tried to write any programs that use COM1: or
COM2: with MicroSoft QuickBasic knows, the DTR modem control line
is dropped everytime a communication file is opened or closed.
I don't know why MicroSoft drops the DTR line all the time; all I
know is that it can be a serious problem with programs such as
RBBS-PC. Therefore, I present the following patch to fix the
problem.
This patch modifies the serial communication routines in the
BCOM10.LIB file so that the DTR line will be not be turned off.
Here is a transcript of a patch session. More detailed
instructions follow it.
C>copy bcom10.lib bcom10bk.lib
1 File(s) copied
C>debug bcom10.lib
-d540 L 10
xxxx:0540 0B D2 75 04 B5 FF EB 34-FA 83 C2 04 32 C0 EE EB ..u....4....2...
-d830 L 10
xxxx:0830 14 8B FA E8 00 00 83 C2-04 32 C0 EB 00 EE C7 47 .........2.....G
-a54c
xxxx:054C mov al, 1
xxxx:054E
-a839
xxxx:0839 mov al, 1
xxxx:083B
-w
Writing 25C00 bytes
-q
1. Make a backup copy of the BCOM10.LIB file, just in case.
2. Run debug and load BCOM10.LIB
C>debug bcom10.lib
3. Display the following sections of data and see that they
match. This is to insure that you are patching the correct
version of the library.
-d540 L 10
xxxx:0540 0B D2 75 04 B5 FF EB 34-FA 83 C2 04 32 C0 EE EB ..u....4....2...
-d830 L 10
xxxx:0830 14 8B FA E8 00 00 83 C2-04 32 C0 EB 00 EE C7 47 .........2.....G
4. If debug shows the same information as listed above, then
you may continue with the patching process. If not, go to
the section Patching other Library Files.
5. Do the following:
-a 54c
xxxx:054C mov al, 1
xxxx:054E
-a 839
xxxx:0839 mov al, 1
xxxx:083B
6. Now write the file back to disk and quit debug. The patch
is complete.
-w
Writing bytes
-q
Patching other Library Files
If you do not have MicroSoft QuickBasic or if you have a
different version than I, you can probably still perform this
patch. You will have to find the correct locations to patch.
The addresses 054C and 0839 were found with the following
procedure:
1. Search for the byte sequence 83 C2 04 32 C0 in the library
file. If you are lucky, debug will find it in exactly two
places.
(for example:)
-s 100 fff0 83 C2 04 32 C0
2. Unassemble the addresses you found. The first two
instructions will be
ADD DX, +04
XOR AL, AL
Within the next few instructions should be
OUT DX, AL
3. If everything has gone correctly so far, just change the
XOR AL, AL
to a
MOV AL, 1
4. Perform this change in both places where the
XOR AL, AL
instruction was found.
5. Write the updated file.